package com.shopping.dao;

import com.shopping.bean.UserAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserAddressDao {
    int add(@Param("address") UserAddress address);
    int edit(@Param("address") UserAddress address);
    int delete(@Param("addressid") int id);
    UserAddress getAddressByID(@Param("addressid")int id);

    List<UserAddress> getAddressByUserID(@Param("userid") int id);

    int cancelDefault(@Param("userid") int userid);
    int setDefault(@Param("addressid") int id);

}
